package com.fdb.efp.console.api.rest.sed;

import com.fdb.basic.framework.core.constant.ResponseData;
import com.fdb.basic.framework.web.controller.AbstractController;
import com.fdb.efp.console.service.facade.SRoleDataRuleService;
import com.fdb.efp.console.service.facade.TaxAuthInfoService;
import com.fdb.efp.console.service.vo.TaxAuthInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * Controller：自然人授权信息表
 * @author ligm
 * @date 2019-04-29 
 */
@RestController
@RequestMapping("/api")
public class TaxAuthInfoController extends AbstractController  {
	
	@Autowired
	@Qualifier("taxAuthInfoService")
	private TaxAuthInfoService taxAuthInfoService;
    
	@Autowired
	@Qualifier("sRoleDataRuleService")
	private SRoleDataRuleService sRoleDataRuleService;


    /**
	 * 新增数据 
	 * @param inTaxAuthInfoVo
	 * @return 
	 */
    @PostMapping(value="/tax/auth/info")
	public @ResponseBody ResponseData<Integer> insertTaxAuthInfo(@RequestBody TaxAuthInfoVO inTaxAuthInfoVo) {
        
		
		

		int outputVo = taxAuthInfoService.insertTaxAuthInfo(inTaxAuthInfoVo);
		return getResponseData(outputVo);	
	}

    /**
	 * 根据主键删除信息 
	 * @param inTaxAuthInfoVo
	 * @return 
	 */
	@DeleteMapping(value="/tax/auth/info")
	public @ResponseBody ResponseData<Integer> deleteByPk(@RequestBody TaxAuthInfoVO inTaxAuthInfoVo) {
        
		
		

		int outputVo = taxAuthInfoService.deleteByPk(inTaxAuthInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键更新信息 
     * @param inTaxAuthInfoVo
	 * @return 
	 */
	@PutMapping(value="/tax/auth/info")
	public @ResponseBody ResponseData<Integer> updateByPk(@RequestBody TaxAuthInfoVO inTaxAuthInfoVo) {
        
		
		

		int outputVo = taxAuthInfoService.updateByPk(inTaxAuthInfoVo);
		return getResponseData(outputVo);
	}

    /**
	 * 根据主键查询详情 
     * @param taxAuthInfo
	 * @return 
	 */
	@GetMapping(value="/tax/auth/info")
	public @ResponseBody ResponseData<TaxAuthInfoVO> queryByPk() {	
        
		
		

		TaxAuthInfoVO inVo = new TaxAuthInfoVO();
		TaxAuthInfoVO outputVo = taxAuthInfoService.queryByPk(inVo);
		return getResponseData(outputVo);
	} 

    /**
	 * 列表数据查询 
	 * @param taxAuthInfo
	 * @return 
	 */
	@RequestMapping(value="/tax/auth/infos", method=RequestMethod.POST)
	public @ResponseBody ResponseData<List<TaxAuthInfoVO>> queryTaxAuthInfoAll(TaxAuthInfoVO vo) {
        
		
		

		List<TaxAuthInfoVO> outputVo = null;
		setUserInfoToVO(vo);

		return getResponseData(outputVo);	
	}
	
	@RequestMapping(value="/tax/auth/info/crdt")
	public @ResponseBody ResponseData<TaxAuthInfoVO> queryByCrdtAppFlowNo(TaxAuthInfoVO vo) {	
        
		
		

		TaxAuthInfoVO inVo = new TaxAuthInfoVO();
		TaxAuthInfoVO outputVo = taxAuthInfoService.queryByCrdtAppFlowNo(inVo);
		return getResponseData(outputVo);
	}
}
